/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.entidad;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Abner Bastarrachea
 */
@javax.persistence.Entity
@Table(name = "entity")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Entity.findAll", query = "SELECT e FROM Entity e"),
    @NamedQuery(name = "Entity.findByPkEntity", query = "SELECT e FROM Entity e WHERE e.pkEntity = :pkEntity"),
    @NamedQuery(name = "Entity.findByFkTypeDocument", query = "SELECT e FROM Entity e WHERE e.fkTypeDocument = :fkTypeDocument"),
    @NamedQuery(name = "Entity.findByNumberDocument", query = "SELECT e FROM Entity e WHERE e.numberDocument = :numberDocument"),
    @NamedQuery(name = "Entity.findByEntity", query = "SELECT e FROM Entity e WHERE e.entity = :entity")})
public class Entity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pkEntity")
    private Integer pkEntity;
    @Basic(optional = false)
    @Column(name = "fkTypeDocument")
    private Integer fkTypeDocument;
    @Basic(optional = false)
    @Column(name = "numberDocument")
    private String numberDocument;
    @Basic(optional = false)
    @Column(name = "entity")
    private String entity;

    public Entity() {
    }

    public Entity(Integer pkEntity) {
        this.pkEntity = pkEntity;
    }

    public Entity(Integer pkEntity, Integer fkTypeDocument, String numberDocument, String entity) {
        this.pkEntity = pkEntity;
        this.fkTypeDocument = fkTypeDocument;
        this.numberDocument = numberDocument;
        this.entity = entity;
    }

    public Integer getPkEntity() {
        return pkEntity;
    }

    public void setPkEntity(Integer pkEntity) {
        this.pkEntity = pkEntity;
    }

    public Integer getFkTypeDocument() {
        return fkTypeDocument;
    }

    public void setFkTypeDocument(Integer fkTypeDocument) {
        this.fkTypeDocument = fkTypeDocument;
    }

    public String getNumberDocument() {
        return numberDocument;
    }

    public void setNumberDocument(String numberDocument) {
        this.numberDocument = numberDocument;
    }

    public String getEntity() {
        return entity;
    }

    public void setEntity(String entity) {
        this.entity = entity;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pkEntity != null ? pkEntity.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Entity)) {
            return false;
        }
        Entity other = (Entity) object;
        if ((this.pkEntity == null && other.pkEntity != null) || (this.pkEntity != null && !this.pkEntity.equals(other.pkEntity))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.entidad.Entity[ pkEntity=" + pkEntity + " ]";
    }
    
}
